"""
创建一个名为Circle的类，并为其添加计算面积(area)，周长(circumference)等方法
"""
import math

PI = math.pi  # pi


class Circle(object):

    def __init__(self, radius):
        self.radius = radius  # 班级

    def cal_area(self):
        circle_area = PI * math.pow(self.radius, 2)
        print(f"面积为：{circle_area}")

    def cal_circumference(self):
        circle_circumference = 2 * PI * self.radius
        print(f"周长为：{circle_circumference}")


if __name__ == "__main__":
    c1 = Circle(4)
    c1.cal_area()
    c1.cal_circumference()